<?php
    error_reporting(E_ERROR);
    session_start();
    if($_POST['pwd']){
        if("123456" == $_POST['pwd']){
            $_SESSION['isLogin'] = true;
            $_SESSION['money'] = 100;
            header("Location: main.php");
        }
    } 
?>
<html>
<head>
</head>
<body>
<form action='' method='post'>
    <input type='text' name='pwd' />
    <input type='submit' value='Login' />
</form>

</body>
</html>